Skip to content

commands: stop dial-stdio when the builder connection closes#3790

Draft
crazy-max wants to merge 1 commit intodocker:masterfrom
crazy-max:dial-stop
Draft

commands: stop dial-stdio when the builder connection closes#3790
crazy-max wants to merge 1 commit intodocker:masterfrom
crazy-max:dial-stop

Conversation

@crazy-max
Copy link
Copy Markdown
Member

@crazy-max crazy-max commented Apr 9, 2026

fixes #3668

Fixes a dial-stdio hang that could persist after the builder connection closed. The command now exits when the read side finishes instead of waiting for a new write on stdin to unblock the process.

The old code used two io.Copy calls and waited for both to finish, which meant a blocked read from stdin could keep the command alive even after the builder connection had already died. This showed up when the Docker daemon restarted and dial-stdio stayed hung until the user pressed Enter.

Tried to add an integration test for this but that's tricky. We would need some wiring with explicit restart/kill hook into the worker to test this regression. So needs changes in BuildKit test framework imo.

cc @invidian @cpuguy83

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dial-stdio hangs until write attempt before returning an error when Docker daemon is restarted

1 participant